<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>红绿灯</title>
    <style>
        .traffic-lights{
            width: 400px;
            height: 100px;
            border: 1px solid #333;
            margin: 0 auto;
        }
        .light{
            width: 80px;
            height: 80px;
            margin-top: 10px;
            border: 1px solid #333;
            float: left;
            margin-left: 10px;
            border-radius: 40px;
        }
        .count{
            width: 80px;
            height: 80px;
            margin-top: 10px;
            font-size: 50px;
            line-height: 80px;
            float: left;
            margin-left: 30px;
        }
        .red{
            background: red;
        }
        .yellow{
            background: yellow;
        }
        .green{
            background: green;
        }
        .gray{
            background: #CCC;
        }
        
    </style>
    <script src="./trafficLisghtsdemo.js"></script>
</head>
<body>
    <div class="traffic-lights">
        <div id="red"     class="light" ></div>
        <div id="yellow"  class="light"></div>
        <div id="green"   class="light"></div>
        <div class="count">30</div>
    </div>
</body>
</html>